package com.imc.platform.demo.httpservice.baidu;

import com.imc.core.config.feign.IBaseRequest;
import com.imc.platform.demo.httpservice.baidu.tuple.JsonRootBean;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * Created by tanweiping on 2018/7/26.
 */
@FeignClient(value = "baike",url = "${services.baidu.baike}")
public interface BaikeService extends IBaseRequest {

    @Data@AllArgsConstructor@NoArgsConstructor@Builder
    class BaikeLemmaCardApiParam{
        @Builder.Default
        private String scope="103";
        @Builder.Default
        private String format = "json";
        @Builder.Default
        private String appid="379020";
        private String bk_key;
        @Builder.Default
        private int bk_length = 600;
    }

    @GetMapping("/BaikeLemmaCardApi")
    JsonRootBean baikeLemmaCardApi(@RequestParam Map<String,Object> param);


}
